cd desktop
# -1 🦜 : generate our pk/sk and get ready the executable
ln -s ~/repo/weak-chain/build-weak/wch wch
./wch toolbox --help
./wch toolbox new-keypair pk.pem sk.pem

# 0. start the chain
w=./wch
$w --port 7777 --light-exe --tx-mode-serious public

w=./wch
# 1. send a tx using the pk
sk=$(pwd)/sk.pem
txf=$(pwd)/tx-pre-tmp.json
txf2=$(pwd)/tx-post-tmp.json
txs='[{"type" : "data", "to" : "", "data" : "This is the first block", "nonce" : 123}]'
echo $txs > $txf
# 3.1 sign the tx
$w toolbox tx-sign-no-crt $txf $sk $txf2
# 3.2 view it
cat $txf2 | jq .

# 4. send the tx
out=$(curl --data @$txf2 http://localhost:7777/add_txs)
# 4.1 view the result
echo $out | jq .
# 4.2 see the tx-receipt
h=$(echo $out | jq -M -r '.[0] | .hash')

# 5. close the chain: 👋
